public class LC1109M {
    public int[] corpFlightBookings(int[][] bookings, int n) {

        int[] ans=new int[n];
        for (int i = 0; i < n; i++) {
            ans[i]=0;
        }
        for (int[] each:bookings){
            for (int i=each[0]-1;i<each[1];i++){
                ans[i]+=each[2];
            }
        }
        return ans;
    }
}
